//package com.aigou.config;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.data.redis.connection.RedisConnectionFactory;
//import org.springframework.data.redis.listener.PatternTopic;
//import org.springframework.data.redis.listener.RedisMessageListenerContainer;
//import org.springframework.data.redis.listener.adapter.MessageListenerAdapter;
//
//import com.aigou.compont.GoodsStatusService;
//import com.aigou.compont.RedisSubCompont;
//
//@Configuration
//public class RedisListenerConfig {
//
//	@Bean
//	public RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory
//			, MessageListenerAdapter listenerAdapter
//			, MessageListenerAdapter listenerAdapterGoodsStatus) {
//		RedisMessageListenerContainer container = new RedisMessageListenerContainer();
//		container.setConnectionFactory(connectionFactory);
//
//		// 可以添加多个 messageListener
//		container.addMessageListener(listenerAdapter, new PatternTopic("channel1"));
//		container.addMessageListener(listenerAdapterGoodsStatus, new PatternTopic("order_overtime_queue"));
//
//		return container;
//	}
//	
//	@Bean
//    public MessageListenerAdapter listenerAdapter(RedisSubCompont redisReceiver) {
//        return new MessageListenerAdapter(redisReceiver, "receiveMessage");
//    }
//	
//	@Bean
//	public MessageListenerAdapter listenerAdapterGoodsStatus(GoodsStatusService statusService) {
//		return new MessageListenerAdapter(statusService, "updateStatus");
//	}
//}
